Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement tileset options #2251

Merged
merged 14 commits into from
Mar 31, 2024
Merged

Conversation

lmoureaux
Copy link
Contributor

This is a general solution for requests like #2037. With these changes, tilesets can specify arbitrary options that modify their appearance according to what the users prefers. This feature is documented in a new page under Modding/Tilesets.

I used this feature to remove cimpletoon and toonhex, as they were just copies of amplio2 and hexemplio with the Cimpletoon units. This is now supported as an option to the main tilesets, reducing maintenance burden. So this PR adds a feature that reduces the total number of lines :D
Cimpletoon and Toonhex users will automatically be migrated to Amplio2 or Hexemplio with the appropriate configuration.

The ultimate test would be implementing #2037 for shipped tilesets 😃

@lmoureaux lmoureaux requested a review from jwrober March 31, 2024 04:44
Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the two small suggestions, rest looks good to me. Local test worked as well.

client/menu.cpp Outdated Show resolved Hide resolved
client/tileset_options.cpp Outdated Show resolved Hide resolved
Options will be boolean values that the user can modify. They will allow
loading non-default sprites, modifying the appearance of a tileset according to
the what the user prefers.
This is a start, but the implementation is not optimal and the settings aren't
saved.
"extra" sprites are specified directly in the tilespec. This isn't used by any
tileset I know of.
Using bools enables better bookkeeping of which options are set or not.
This isn't doing anything yet.
The user-visible name might change, but as long as the tilespec isn't renamed
this shouldn't matter for options.
Instead of duplicating the whole tileset with another name, add an option
called "cimpletoon" to load cimpletoon units. Support is added to amplio2 and
hexemplio.
Since amplio2 and hexemplio can now be made to use cimpletoon units, there is
no point in keeping separate tilesets. Add code to migrate user configurations
before dropping cimpletoon and toonhex.
It has been made obsolete by tileset options.
It has been made obsolete by tileset options.
@lmoureaux lmoureaux force-pushed the feature/tileset-options branch from 5e0fc10 to 785a0fd Compare March 31, 2024 19:38
@lmoureaux lmoureaux enabled auto-merge (rebase) March 31, 2024 19:42
@lmoureaux lmoureaux merged commit 2411618 into longturn:master Mar 31, 2024
18 of 19 checks passed
@lmoureaux lmoureaux deleted the feature/tileset-options branch March 31, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants